package cn.rebeater.navigationclient.ui.dashboard;

import android.util.Log;

import java.util.Locale;


public class NavigationData{
    public NavigationData(double [] pva){
/*        acce_bias = new float[3];
        gyro_bias = new float[3];
        pos_std = new float[3];
        vn_std = new float[3];
        atti_std = new float[3];*/
        week = (int) pva[0];
        gpst = pva[1];
        lat = pva[2];
        lon = pva[3];
        height =(float) pva[4];
        vn =(float)  pva[5];
        ve = (float) pva[6];
        vd  =(float)  pva[7];
        roll = (float) pva[8];
        pitch = (float) pva[9];
        heading =(float)  pva[10];

/*        for(int i = 0; i < 3; i ++){
            gyro_bias[i] =(float)  pva[i+11];
        }
        for(int i = 0; i < 3; i ++){
            acce_bias[i] =(float)  pva[i+14];
        }
        for(int i = 0; i < 3; i ++){
            pos_std[i] =(float)  pva[i+17];
        }*/
/*        for(int i = 0; i < 3; i ++){
            vn_std[i] =(float)  (pva[i+20]/1e4);
        }*/
/*        for(int i = 0; i < 3; i ++){
            atti_std[i] = (float) (pva[i+20]/1e4);
        }
        odo_kd =(float)  (pva[23]/100);
*/
        String s = String.format(Locale.getDefault(),"%d",(int)pva[11]);
        mode = (int)pva[11]/1000;
        Log.i("mydebug", "NavigationData: mode="+ mode+" "+ s);

    }
    public double gpst;
    public
            int week;
    double lat;
    public  double lon;
    public  float height;
    public   float vn;
    public   float ve;
    public   float vd;
    public   float roll;
    public  float pitch;
    public   float heading;

    public float[] acce_bias;
    public float[] gyro_bias;

    public float[] pos_std;
    public float[] vn_std;
    public float[] atti_std;
    public float odo_kd;

    public int mode;
}
